﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Earn : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["flag"] == null)
            {
                
                Response.Redirect("../pages/Statistic/Earn.aspx");
            }
            this.bind();
        }
    }
    public void bind()
    {
        DataSet ds = DB.reDs("select distinct Payment ,sum(Owe) as a,sum(Money)as m ,sum(Money+Owe) as p from tb_Earn group by Payment");
        this.gvStatistic.DataSource = ds;
        this.gvStatistic.DataBind();
    }
}
